<?php

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class AsynchronousIOFile
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    public $types;
    public $product_id;
    public $user_id;
    public $worker_id;
    public $start_time;
    public $end_time;
    public $time_chose;
    public $branch_id;
    public $order_status;
    public $excel_record_id;
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct($types, $product_id, $user_id, $worker_id, $start_time, $end_time, $time_chose, $branch_id, $order_status, $excel_record_id)
    {
        $this->types = $types;
        $this->product_id = $product_id;
        $this->user_id = $user_id;
        $this->worker_id = $worker_id;
        $this->start_time = $start_time;
        $this->end_time = $end_time;
        $this->time_chose = $time_chose;
        $this->branch_id = $branch_id;
        $this->order_status = $order_status;
        $this->excel_record_id = $excel_record_id;
    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return \Illuminate\Broadcasting\Channel|array
     */
    public function broadcastOn()
    {
        return new PrivateChannel('channel-name');
    }
}
